﻿<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true" CodeBehind="Ad.aspx.cs"
    Inherits="ETongJin.YM.Web.Admin.Ad" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="1">
        <tr>
            <th colspan="2" class="ym12_bti" id="bttitle" runat ="server">
               添加广告
            </th>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                搜索类型：
            </td>
            <td class="td1">
                <asp:RadioButtonList ID="rblSearchType" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="true" Text="行业搜索" Value="0"></asp:ListItem>
                    <asp:ListItem Text="聚合搜索" Value="1"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                广告位置：
            </td>
            <td class="td1">
                <asp:RadioButtonList ID="rblPosition" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="true" Text="左边上面" Value="0"></asp:ListItem>
                    <asp:ListItem Text="左边下面" Value="1"></asp:ListItem>
                    <asp:ListItem Text="右边" Value="2"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                匹配的关键词：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtKeyword" runat="server" Width="310px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtKeyword" ErrorMessage="不能为空！"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                最高出价：             </td>
            <td class="td1">
                <asp:TextBox ID="txtPrice" runat="server" Width="68px">1</asp:TextBox>
                积分（只能输入整数，出价越高，您的广告排名越靠前）
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                广告类型：
            </td>
            <td class="td1">

                <script type="text/javascript">
            function gx(obj)
            {
            switch(obj.id)
            {
               case "Radio0":
                    $("#gx0").show(); 
                    $("#gx1").show();
                    break;
               case "Radio1":
                    $("#gx0").hide(); 
                    $("#gx1").hide();
                    break ;
            }
            }
                </script>

                <input id="Radio0" type="radio" value="0" name="adtype" checked="checked" onclick="gx(this);" />
                <label for="Radio0">
                    标准广告</label>
                <input id="Radio1" type="radio" name="adtype" value="1" onclick="gx(this);" />
                <label for="Radio1">
                    HTML代码</label>
            </td>
        </tr>
        <tr id="gx0">
            <td class="td1" style="width: 134px">
                标题：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtName" runat="server" Width="310px" MaxLength="35"></asp:TextBox>
            </td>
        </tr>
        <tr id="gx1">
            <td class="td1" style="width: 134px">
                广告链接页面：
            </td>
            <td class="td1">
                <asp:TextBox ID="txtUrl" runat="server" Width="310px" Text="http://"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtUrl" ErrorMessage="不是有效的网页地址！" 
                    ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                广告内容：             </td>
            <td class="td1">
                <asp:TextBox ID="txtContents" runat="server" Height="60px" TextMode="MultiLine" Width="313px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtContents"
                    ErrorMessage="广告内容不能为空!"></asp:RequiredFieldValidator>
                <br />
                
            </td>
        </tr>
        <tr>
            <td class="td1" style="width: 134px">
                广告状态：             </td>
            <td class="td1">
               
                <asp:RadioButtonList ID="rblAdStatus" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="true" Text="正在投放" Value="0"></asp:ListItem>
                    <asp:ListItem Text="已审核，广告主暂停" Value="-1"></asp:ListItem>
                    <asp:ListItem Text="广告主申请投放" Value="-2"></asp:ListItem>
                    <asp:ListItem Text="未审核，广告主暂停" Value="-3"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <th colspan="2" class="ym12_bti">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text=" 添加 " />
            </th>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <br />
            </td>
        </tr>
    </table>
</asp:Content>
